package net.sivashov.grailssample

/**
 * @author leopold
 * @since 23.02.13
 */
class Book implements Serializable {
    String name
    String author
    String genre
    Date year
    String publisher
    Integer rate

    static constraints = {
        name nullable: false, blank: false, maxSize: 255
        author nullable: true, blank: true, maxSize: 255
        genre nullable: true, blank: true, maxSize: 255
        year nullable: true
        publisher nullable: true, blank: true, maxSize: 255
        rate nullable: true
    }

    static mapping = {
        datasource 'custom'
    }
}
